<!DOCTYPE html>
<html>
<head>
    <!-- 页面meta -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>HEIMA商城管理系统</title>
    <meta name="description" content="HEIMA商城管理系统">
    <meta name="keywords" content="HEIMA商城管理系统">
    <meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" name="viewport">
    <!-- 引入样式 -->
    <link rel="stylesheet" href="plugins/elementui/index.css">
    <link rel="stylesheet" href="plugins/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="css/style.css">
    <style type="text/css">
    .el-main{
        position: absolute;
        top: 70px;
        bottom: 0px;
        left: 200px;
        right: 10px;
        padding: 0;
    }
    </style>
</head>
<body class="hold-transition skin-purple sidebar-mini">
    <div id="app">
        <el-container>
            <el-header  class="main-header" style="height:80px;">
                <nav class="navbar navbar-static-top" :class=''>

                    <span style="vertical-align: center;color: yellow;font-size:42px; height:100%;">
                        <b><span style="font-family:Segoe UI Emoji;">HEIMA</span><span style="font-family: 华文行楷; font-size: 45px;">商城管理系统</span></b>
                    </span>

                    <div class="right-menu">
                        <span class="help"><i class="fa fa-exclamation-circle" aria-hidden="true"></i>帮助</span>
                        <el-dropdown class="avatar-container right-menu-item" trigger="click">
                            <div class="avatar-wrapper">
                                <img src="img/heima.png" class="user-avatar">
                                Itheima
                            </div>
                            <el-dropdown-menu slot="dropdown">
                                <el-dropdown-item divided>
                                    <span style="display:block;">修改密码</span>
                                </el-dropdown-item>
                                <el-dropdown-item divided>
                                        <span style="display:block;">退出</span>
                                    </el-dropdown-item>
                            </el-dropdown-menu>
                        </el-dropdown>
                    </div>
                </nav>
            </el-header>


            <el-container>
                <el-aside width="200px">
                    <el-menu>
                        <el-submenu v-for="menu in menuList" :index="menu.path">
                            <template slot="title">
                                <i class="fa" :class="menu.icon"></i>
                                {{menu.title}}
                            </template>
                            <template v-for="child in menu.children">
                                <el-menu-item :index="child.path">
                                    <a :href="child.linkUrl" target="right"><i class="fa" :class="child.icon"></i>{{child.title}}</a>
                                </el-menu-item>
                            </template>
                        </el-submenu>
                    </el-menu>
                </el-aside>

                <el-container>
                    <iframe name="right" class="el-main" src="brand.html" width="100%" height="655px" frameborder="0"></iframe>
                </el-container>

            </el-container>
        </el-container>
    </div>
</body>


<!-- 引入组件库 -->
<script src="js/vue.js"></script>
<script src="plugins/elementui/index.js"></script>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script>
    new Vue({
        el: '#app',
        data:{
            menuList:[
                {
                    "path": "1",
                    "title": "工作台",
                    "icon":"fa-dashboard",
                    "children": [{
                        "path": "/1-1",
                        "title": "运营统计",
                        "icon": "el-icon-document",
                        "linkUrl":"default.html",
                        "children":[]
                    },
                    {
                        "path": "/1-2",
                        "title": "用户统计",
                        "linkUrl":"default.html",
                        "icon": "el-icon-document",
                        "children":[]
                    }]
                },
                {
                    "path": "2",
                    "title": "商品管理",
                    "icon":"el-icon-menu",
                    "children": [
                        {
                            "path": "/2-1",
                            "title": "品牌管理",
                            "icon": "el-icon-document",
                            "linkUrl":"brand.html",
                            "children":[]
                        },
                        {
                            "path": "/2-2",
                            "title": "分类管理",
                            "linkUrl":"category.html",
                            "icon": "el-icon-document",
                            "children":[]
                        },
                        {
                            "path": "/2-3",
                            "title": "规格管理",
                            "linkUrl":"spec.html",
                            "icon": "el-icon-document",
                            "children":[]
                        },
                        {
                            "path": "/2-4",
                            "title": "商品管理",
                            "linkUrl":"goods.html",
                            "icon": "el-icon-document",
                            "children":[]
                        }
                    ]
                },
                {
                    "path": "3",
                    "title": "系统设置",
                    "icon":"el-icon-setting",
                    "children": [
                        {
                            "path": "/3-1",
                            "title": "用户管理",
                            "linkUrl":"default.html",
                            "icon": "el-icon-document",
                            "children":[]
                        },
                        {
                            "path": "/3-2",
                            "title": "角色管理",
                            "linkUrl":"default.html",
                            "icon": "el-icon-document",
                            "children":[]
                        }
                    ]
                }
            ]
        }
    });
    $(function() {
            var wd = 200;
            $(".el-main").css('width', $('body').width() - wd + 'px');
    });
</script>
</html>
